<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1" name="viewport">
  <title>Guides — Monitoror, unified monitoring wallboard</title>
  <meta content="Guides to use Monitoror, which is a wallboard monitoring app to monitor server status; monitor CI builds progress or even display critical values"
        name="description">
  <link href="/favicon.png" rel="icon" type="image/png">
  <link href="/favicon.ico" rel="icon">
  <link href="/assets/styles/main.css" rel="stylesheet" type="text/css">
  <link rel="canonical" href="https://monitoror.com/guides/">

  <!-- OpenGraph / Twitter cards -->
  <meta property="og:image" content="https://monitoror.com/assets/images/opengraph.png" />
  <meta property="og:site_name" content="Monitoror" />
  <meta property="og:type" content="website" />
  <meta property="og:title" content="Guides — Monitoror, unified monitoring wallboard" />
  <meta property="og:url" content="https://monitoror.com/guides/" />
  <meta property="og:description" content="Documentation of Monitoror which is a wallboard monitoring app to monitor server status; monitor CI builds progress or even display critical values" />
  <meta name="twitter:image:src" content="https://monitoror.com/assets/images/opengraph.png" />
  <meta name="twitter:card" content="summary_large_image" />
  <meta name="twitter:title" content="Guides — Monitoror, unified monitoring wallboard" />
  <meta name="twitter:description" content="Guides to use Monitoror, which is a wallboard monitoring app to monitor server status; monitor CI builds progress or even display critical values" />
</head>
<body class="m-documentation">
<!-- Used to avoid custom scrollbar on macOS -->
<script>
  const isMacOs = navigator.platform.toLowerCase().includes('mac')
  if (isMacOs) {
    document.body.classList.add('macos')
  }
</script>

<div class="m-documentation--header-mobile">
  <button id="js-toggle-menu" class="m-documentation--header-menu-icon">Menu</button>
  <a href="/">
    <img alt="Monitoror" class="m-documentation--header-mobile-logo" src="/assets/images/logo.svg">
  </a>
</div>

<div class="m-sidebar">
  <header class="m-documentation--header">
    <a href="/">
      <img alt="Monitoror" class="m-documentation--logo" src="/assets/images/logo.svg">
    </a>
    <h1 class="m-documentation--header-title">
      Guides
    </h1>
  </header>

  <aside class="m-documentation--menu">
    <ul>
      <li>
        <a href="#installation-by-platform">Installation by platform</a>
        <ul>
          <li><a href="#installation-raspberrypi">Raspberry Pi</a></li>
        </ul>
      </li>
      <li>
        <a href="#development">Development</a>
        <ul>
          <li><a href="#requirements">Requirements</a></li>
          <li><a href="#install-go-tools">Install Go tools</a></li>
          <li><a href="#run-project">Run project</a></li>
        </ul>
      </li>
    </ul>
  </aside>
</div>

<main class="m-documentation--content">
  <section class="m-documentation--section" id="installation-by-platform">
    <h2 class="m-documentation--section-title">Installation by&nbsp;platform</h2>

    <div class="m-documentation--block">
      <svg class="m-documentation--tile-icon" xmlns="http://www.w3.org/2000/svg">
        <use xlink:href="/assets/images/icons.svg#raspberry-pi"/>
      </svg>

      <h3 id="installation-raspberrypi">Raspberry Pi</h3>

      <h4>Prerequisites</h4>

      <pre><code class="language-bash">
# Chromium
sudo apt-get update
sudo apt-get install chromium-browser --yes

# Disabling screen saver
sudo cat > /usr/bin/screensaver_off.sh &lt;&lt;END
#!/bin/bash
sleep 10 &&
sudo xset s 0 0
sudo xset s off
exit 0
END

sudo chmod +x /usr/bin/screensaver_off.sh

# /!\ Must be run with user which start x server, usually pi
cat > ~/.config/autostart/screensaver_off.desktop &lt;&lt;END
[Desktop Entry]
Type=Application
Exec=/usr/bin/screensaver_off.sh
Hidden=false
X-MATE-Autostart-enabled=true
Name[fr_FR]=screensaver_off
Name=screensaver_off
Comment[fr_FR]=
  Comment=
END
      </code></pre>


      <h4>Install Monitoror</h4>

      <pre><code class="language-bash">
# Download binary file and make it executable
sudo mkdir /opt/monitoror
sudo curl -s -o /opt/monitoror/monitoror https://github.com/monitoror/monitoror/releases/latest/download/monitoror-linux-arm
sudo chmod +x /opt/monitoror/monitoror

# Create backend configuration file
# Setup default UI config with MO_CONFIG
touch /opt/monitoror/.env
      </code></pre>

      <p class="note">
        <span class="tag">Tip:</span>
        To run monitoror with another user, change binary owner.
      </p>


      <h4>Starting Monitoror</h4>

      <h5 class="m-documentation--configuration-side-title">Manually</h5>

      <pre><code class="language-bash">
# Starting backend
/opt/monitoror/monitoror

# Starting UI
chromium-browser --kiosk --password-store=basic --disable-infobars \
  --app=http://localhost:8080/
      </code></pre>

      <h5 class="m-documentation--configuration-side-title">Automatically</h5>

      <pre><code class="language-bash">
# Backend startup with systemd
sudo cat > /lib/systemd/system/monitoror.service &lt;&lt;END
[Unit]
Description=Monitoror
After=multi-user.target

[Service]
Type=idle
ExecStart=/opt/monitoror/monitoror
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=monitoror

[Install]
WantedBy=multi-user.target
END

sudo systemctl enable monitoror.service
sudo systemctl start monitoror.service

# rsyslog configuration
sudo cat > /etc/rsyslog.d/99-monitoror.conf &lt;&lt;END
if \$programname == 'monitoror' then /var/log/monitoror/monitoror.log
& stop
END

sudo mkdir /var/log/monitoror/
sudo touch /var/log/monitoror/monitoror.log
sudo chown syslog:adm /var/log/monitoror/monitoror.log

sudo service rsyslog restart

# UI startup with autostart
# /!\ Must be run with user which start x server, usually pi
cat > ~/.config/autostart/chromium-browser.desktop &lt;&lt;END
  [Desktop Entry]
  Type=Application
  Exec=chromium-browser --kiosk --password-store=basic --disable-infobars --app=http://localhost:8080/
  Hidden=false
  X-MATE-Autostart-enabled=true
  Name[fr_FR]=chromium-browse
  Name=chromium-browser
  Comment[fr_FR]=
    Comment=
  END
      </code></pre>
    </div>
  </section>

  <section class="m-documentation--section" id="development">
    <h2 class="m-documentation--section-title">Development</h2>

    <div class="m-documentation--block">
      <p class="alert-block">
        <svg xmlns="http://www.w3.org/2000/svg">
          <use xlink:href="/assets/images/icons.svg#alert"/>
        </svg>
        This section is for development purposes only. <br>
        Those tools are not necessary to run Monitoror from binaries.
      </p>

      <h3 id="requirements">Requirements</h3>

      <ul>
        <li>Go v1.23+</li>
        <li>Nodejs v10+</li>
        <li>Yarn v1.7+</li>
      </ul>
    </div>

    <div class="m-documentation--block">
      <svg class="m-documentation--tile-icon" xmlns="http://www.w3.org/2000/svg">
        <use xlink:href="/assets/images/icons.svg#golang"/>
      </svg>

      <h3 id="install-go-tools">Install Go tools</h3>

      <p>
        Execute these commands either:
      </p>
      <ul>
        <li>outside of Monitoror project</li>
        <li>or use <code>go mod tidy</code> after them</li>
      </ul>

      <pre class="language-bash"><code>
# Generating mock for backend
go install github.com/vektra/mockery/v2@v2.46.2

# Test utilities
go install gotest.tools/gotestsum@v1.12.0

# Embed UI dist into go binary
go install github.com/GeertJohan/go.rice/rice@v1.0.3
      </code></pre>

      <p>
        See <a href="https://github.com/golangci/golangci-lint#install">golangci-lint</a>
        installation guide to install linter.
      </p>
    </div>

    <div class="m-documentation--block">
      <h3 id="run-project">Run project</h3>

      <h5 class="m-documentation--configuration-side-title">Start project</h5>
      <pre class="language-bash"><code>
# Core
make install
make run
      </code></pre>
      <pre class="language-bash"><code>
# UI
cd ui
yarn
yarn serve
      </code></pre>

      <h5 class="m-documentation--configuration-side-title">Build project</h5>
      <pre class="language-bash"><code>
cd ui
yarn
yarn run build
cd ..
make install
make build
      </code></pre>

      <h5 class="m-documentation--configuration-side-title">Run tests and lint</h5>
      <pre class="language-bash"><code>
make test
make lint
      </code></pre>


      <h5 class="m-documentation--configuration-side-title">List all the available targets</h5>
      <pre class="language-bash"><code>
make help
      </code></pre>
    </div>
  </section>
</main>
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.17.1/build/highlight.min.js"></script>
<script src="/js/main.js"></script>
</body>
</html>
